package com.example.insurance_service.controller;

import com.example.insurance_service.config.AjaxResult;
import com.example.insurance_service.domain.InsuranceType;
import com.example.insurance_service.service.InsuranceTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apiguardian.api.API;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("insuranceType")
@CrossOrigin
@Api("保险类型Controller")
public class InsuranceTypeController {

    @Autowired
    private InsuranceTypeService insuranceTypeService;

    @RequestMapping("getList")
    @ApiOperation(value = "查询",notes = "无需参数")
    public AjaxResult getList(){
        List<InsuranceType> list=insuranceTypeService.findAll();
        return AjaxResult.ok(list);
    }
}
